package cn.jimmie.learn.viewArt.fragment

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup

/**
 * function :
 *
 * <p> Create Time:  2019年01月15日 17:14 </p>
 * <p> @author Jimmie.Qian  </p>
 */

abstract class BaseFragment : Fragment() {

    abstract fun initView(root: View)

    abstract fun layoutId(): Int

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {

        val root = inflater.inflate(layoutId(), null, false)
        initView(root)
        return root
    }
}